-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMake fixes to support Windows builds. #1
base: master
Are you sure you want to change the base?
Conversation
* [Execution, SymbolicEnvironment] Correct _cdecl adn _stdcall definitions * [VirtualMemory] Renamed structure MemoryRegionInfo so it doesn't collide with enum value * [revtracer-wrapper] Added compile time definition Everything compiles now on windows!
* [BinLoader] added Extern.Mapper.cpp and Mem.Mapper.cpp to cmake. * [Execution, loader, revtracer-wrapper] Specified OS-dependant libs. * [Execution] Removed redundant ifdef in Main.cpp
CMakeLists.txt
Outdated
@@ -1,8 +1,14 @@ | |||
cmake_minimum_required(VERSION 2.8) | |||
set(CMAKE_SYSTEM_NAME Linux) | |||
cmake_minimum_required(VERSION 3.7) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ubuntu supports cmake 3.5 in the official repositories. What is the reason behind 3.7? We need to upgrade all the machines with RIVER for this change otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the requirement for cmake 3.7. I strongly suggest setting a DESTDIR when running cmake since the default DESTDIR for Windows is %programfiles%.
@@ -1,16 +1,25 @@ | |||
## Execution CMakeLists.txt | |||
|
|||
set(LIBRARY_NAME execution) | |||
set(FLAGS_CROSS "-D__cdecl=\"\" -D__stdcall=\"\"") | |||
if(WIN32) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this if statement sets the previous version on LINUX and your version on WIN
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find it weird that calling conventions get smashed on linux. Are you sure this is your intention?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should work with __attribute__((stdcall))
and __attribute__((cdecl))
. But I see the definition is for _cdecl
and _stdcall
. The previous code uses __stdcall
and __cdecl
. Check for example revtracer/revtracer.h:70
These changes can help us extend the tracer functionality on Windows. Very good initiative. I have few extra comments:
|
Quickly documented Windows build steps
|
Windows build worked. Please disable |
The next actions points are:
|
I found the CMake suppport for Windows lacking, and I decided to try to improve it. Please let me know what additional modifications I need to make for a reliable windows+cmake build